# from main import *
from PyQt5.QtCore import QPropertyAnimation, QEasingCurve

class Menu():
    def toggleMenu(self, enable):
        if enable:
            width = self.LeftMenu.width()
            maxExtend = 240
            standard = 60
            if width == 60:
                widthExtended = maxExtend
            else:
                widthExtended = standard

            self.animation = QPropertyAnimation(self.LeftMenu, b"minimumWidth")
            self.animation.setDuration(500)
            self.animation.setStartValue(width)
            self.animation.setEndValue(widthExtended)
            self.animation.setEasingCurve(QEasingCurve.InOutQuart)
            self.animation.start()